//
//  AppDelegate.swift
//  test-ios
//
//  Created by wyz5204 on 2023/2/2.
//

import UIKit
import MMKV
import CocoaLumberjack

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // 初始化MMKV
        MMKV.initialize(rootDir: nil)
        // DDLog
        DDLog.add(DDOSLogger.sharedInstance)
        DDLog.add(DDFileLogger().then { logger in
            logger.rollingFrequency = TimeInterval(60*60*24)  // 24 hours
            logger.logFileManager.maximumNumberOfLogFiles = 7
        })
        
        return true
    }

    // MARK: UISceneSession Lifecycle

    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
        return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
    }

    func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
    }


}

